local skel = fk.CreateSkill {
  name = "emo__weimu",
  tags = {Skill.Compulsory},
}

skel:addEffect(fk.EventPhaseChanging, {
  anim_type = "defensive",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(skel.name) and target == player and not player:isWounded() and data.phase == Player.Discard
  end,
  on_use = function(self, event, target, player, data)
    player:skip(data.phase)
  end,
})

skel:addEffect(fk.DamageInflicted, {
  anim_type = "defensive",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(skel.name) and target == player and not player.faceup
  end,
  on_use = function(self, event, target, player, data)
    data:changeDamage(-1)
  end,
})

skel:addEffect("prohibit", {
  is_prohibited = function (self, from, to, card)
    if to:hasSkill(skel.name) and card.color == Card.Black then
      if card.type == Card.TypeTrick then return true end
      if card.trueName == "slash" and card.color == Card.NoColor then
        return #card.subcards > 0 or #card.skillNames > 0
      end
    end
  end,
})

Fk:loadTranslationTable{
  ["emo__weimu"] = "帷幕",
  [":emo__weimu"] = "锁定技，无色【杀】和黑色锦囊牌不能指定你为目标；若你未受伤，你跳过弃牌阶段；若你背面朝上，你受到的伤害-1。",
}


return skel
